using System;
using System.Collections.Generic;
using System.Web.UI;
using Tarantino.Samples.Core.Model;
using StructureMap;
using Tarantino.Core.Commons.Services.Repositories;

namespace Tarantino.Samples.UI
{
	public partial class ViewSystemUsers : Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			if (!Page.IsPostBack)
			{
				IPersistentObjectRepository repository = ObjectFactory.GetInstance<IPersistentObjectRepository>();
				IEnumerable<SystemUser> systemUsers = repository.GetAll<SystemUser>();

				grdSystemUsers.DataSource = systemUsers;
				grdSystemUsers.DataBind();
			}
		}
	}
}